package com.xiaoshuidi.cloud.module.member.api.comment;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.member.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @description: 评价API
 * @author: Jax.Lan
 * @create: 2023-05-29 15:11
 **/
@FeignClient(name = ApiConstants.SERVERNAME)
@Tag(name = "RPC 服务 - 评价")
public interface CommentApi {

    String PREFIX = ApiConstants.PREFIX + "/comment";

    /**
     * 初始化评论
     * @param commentType 评论类型，在枚举类 CommentTypeEnum
     * @param tenantId 租客ID
     * @param stewardId 管家用户ID
     * @param apartmentNo 公寓编码
     * @return
     */
    @PostMapping(PREFIX + "/initComment")
    @Operation(summary = "初始化评论")
    CommonResult<Boolean> initComment(@RequestParam("commentType") Integer commentType,
                                      @RequestParam("tenantId") Long tenantId,
                                      @RequestParam("stewardId") Long stewardId,
                                      @RequestParam("apartmentNo") String apartmentNo);
}
